
/**
*
* @ author: hxwy
* @ email: 928936715@qq.com
* @ date: 2020-04-13 18:22
*/
export default class CameraFollow extends Laya.Script3D {

    constructor() {
        super();
    }
    onAwake()
    {
        Laya.stage.on("MoveCamera",this,this.follow);
        Laya.stage.on("ContinueGame",this,function()
        {
            (this.owner as Laya.Sprite3D).transform.position = new Laya.Vector3(0,1.3,-4.7);
        });
    }
    follow(posy:number)
    {
        Laya.Tween.to((this.owner as Laya.Sprite3D).transform, {localPositionY:posy}, 300);
    }
}
